Repository navigation
IBM: wall conduction through the unbounded mirror temperature for chemistry walls - #2248
Open
sbryngelson wants to merge 7 commits into
Open
sbryngelson wants to merge 7 commits into
sbryngelson wants to merge 7 commits into
Conversation
The ghost temperature of a chemistry immersed boundary was one number, the mirror T_g = T_s + theta (T_s - T_IP) held inside the 200-5000 K window of the thermodynamic fits, because the diffusion flux also evaluated the ghost's conductivity, diffusivities, enthalpies and density at it. For a cold body in hot gas the window cut theta to about 0.08 and with it the wall heat flux, and an under-resolved layer could still drive the first gas cell past T_s. - The conduction gradient reads the mirror in q_T_sf at the ghost (ghost_point%T_cond, s_ibm_set_conduction_temperature), with no window; the ghosts' own temperatures are put back once the face fluxes are formed. theta is cut by f_face_theta so the two-point conduction across a face to a fluid neighbour cannot take it past T_s; a neighbour within a quarter cell of the wall plane is left out, as its temperature is within noise of T_s. - The chemistry diffusion evaluates the properties of an immersed-body cell at its own state temperature p W/(rho R) (ib_mode 1 and 2); the face difference alone comes from q_T_sf. - The advected ghost is wall gas at T_s for a fixed body; a moving body's lab-frame faces advect the ghost into the fluid, so it carries the windowed mirror. The conduction temperature is not checkpointed: the first stage after a restart conducts through the ghost's own temperature. The restart round trip of the lumped wall is therefore run with diffusion off.
… changes; add the lumped-wall restart golden Nine chemistry immersed-boundary goldens move because the ghost state of an isothermal or reacting wall is now wall gas at T_s and the conduction reads the unwindowed mirror. The lumped-wall restart round trip is a new test with diffusion off, since the conduction temperature is not checkpointed. Generated on an A100 node (NVHPC, OpenACC) and checked on MI300A (amdflang, OpenMP offload) with no tolerance change.
|
Claude Code Review Head SHA: b68928c Files changed:
Findings:
|
sbryngelson
marked this pull request as ready for review
November 14, 2026 03:20
sbryngelson
requested review from
danieljvickers
and removed request for
a team
November 14, 2026 03:20
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2248 +/- ##
==========================================
- Coverage 65.15% 64.99% -0.17%
==========================================
Files 110 110
Lines 29555 29610 +55
Branches 4476 4488 +12
==========================================
- Hits 19256 19244 -12
- Misses 6743 6803 +60
- Partials 3556 3563 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Lines of Code
|
…FlowCode#2205 MFlowCode#2200 added the Thermostat and Thermostat -> Wall Temperature tests with goldens made before MFlowCode#2205 (second-order face composition in the diffusion correction flux) landed, and its CI ran on a base without MFlowCode#2205. On master the two tests miss their goldens by up to 7.7e-6 relative (tolerance 1e-6).
…s ghost temperature also moves 8B2A7F3E, FAF04D7A and 3F5FE078 (MFlowCode#2213 inert and trace-species flux walls) and F8D466BD and C02C399E (MFlowCode#2200 thermostat, goldens regenerated for MFlowCode#2205) were generated on master without the isothermal ghost change.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits on
origin/master478a270: the code change with the new restart test, then the regenerated goldens. Without chemistry nothing changes (every IBM-labelled test passes with its existing golden on both vendors); the new code is gated onib,chemistryandchem_params%diffusion. No parameter is added.Summary
For a chemistry immersed boundary the ghost temperature was one number, the linear mirror
T_g = T_s + theta (T_s - T_IP), held inside the 200-5000 K window of the thermodynamic fits, because the chemistry diffusion flux also evaluated the ghost cell's conductivity, diffusivities, enthalpies and density at it. For a cold wall in hot gas the window cutsthetahard (T_s = 300 K,T_IP = 1500 Kgivestheta <= 0.9 (300 - 200)/(1500 - 300) = 0.075), so the wall heat flux is carried by a gradient about 13 times too small, and an under-resolved layer could still push the first gas cell pastT_s.m_ibm.fpp,m_rhs.fpp). The mirror is stored per ghost (ghost_point%T_cond,s_ibm_set_conduction_temperature) and put inq_T_sfat the ghost, with no window, only for the face fluxes. The ghosts' own temperatures are put back right after (s_ibm_restore_conduction_temperature), so the reaction source and the split chemistry substep see them unchanged.thetais cut byf_face_thetaso that the two-point conduction across a face to a fluid neighbour cannot take that neighbour pastT_s; a neighbour within a quarter cell of the wall plane is left out (its temperature is within noise ofT_s).m_chemistry.fpp). The diffusion flux evaluates the properties of an immersed-body cell at its own state temperaturep W/(rho R)(ib_mode1 and 2); only the face temperature difference comes fromq_T_sf.use_wallbecomes the integerib_mode(0 no body, 1 body, 2 body withib_flux_wall); the diffusion kernels keep oneGPU_PARALLEL_LOOPper mode.m_ibm.fpp). It is wall gas atT_sfor a fixed body. A moving body's lab-frame faces advect the ghost into the fluid, so it carries the windowed mirror.GPU pattern: the new kernels store only scalar components (
ghost_points(i)%T_cond,%T_save), never whole-array assignments; the new device routines areseqroutines with scalar arguments, written like the existings_blend_ghost_temperature.Evidence
Machines. A100: NVIDIA A100, nvfortran 25.11, OpenACC, 1 rank. MI300A: AMD MI300A, amdflang (AFAR), OpenMP offload, 1 rank.
Measured demonstration (A100, master vs this branch). A fixed isothermal cylinder (
thermal_bc = 1,Twall= 300 K, R = 1 mm) in quiescent 1500 K air (11-species mechanism of the reacting-surface example, diffusion on, reactions off, inviscid) in a closed box of half-width 3R. The table is the heat taken by the body per unit depth, the time integral ofib_heat_wrtcolumn 5, up to t = 0.02 R^2/alpha = 59.2 us (alpha of the 1500 K gas; the conduction layer is about 0.14 R thick). The reference is this branch's 128 cells/R run, which is itself not fully converged (it is not an independent solution), so the percentages show the rate of convergence, not an error bar.At every resolution the branch takes more heat; its heat at N cells/R is about what master reaches at 2N. At t = 0.1 R^2/alpha (296 us) the same ordering holds (8, 16, 32 cells/R, master then branch, J/m): 0.6009 / 0.6848, 0.7046 / 0.7709, 0.7774 / 0.8029; master at 64 cells/R is 0.8168 (the branch run at 64 cells/R was not finished). The two schemes converge to the same heat; the change is in how fast. The coldest gas cell outside the body stayed above
Twallin every run (lowest value 335 K), so this case does not show the first-gas-cell overshoot that the face boundf_face_thetaguards against; I have no measured case for that guard beyond the unchanged-answer tests below.Tests
./mfc.sh formatand./mfc.sh precheckpass. Labels run separately and together,--no-buildafter a dry-run build, with the master goldens first:The same ten tests fail on both vendors. Nine are existing goldens that move (before the example
2D_ibm_lumped_wallwas dropped from the suite in #2215; eight remain); the tenth,2D -> Chemistry -> IBM Reacting Surface -> Lumped Wall -> Restart, is new and has no golden. The goldens were generated on the A100 node and checked on the MI300A: all ten pass there with the existing tolerances, so nooverride_tolis added. The new restart test also passes its restart check (straight run against restart from the first save,Twallincluded) on both. After merging master (#2200, #2213, and the thermostat golden fix #2251) five more goldens move, so thirteen move in all: 3F5FE078, 8B2A7F3E and FAF04D7A (the inert and trace-species flux walls of #2213) and F8D466BD and C02C399E (the thermostat tests of #2200/#2205). They were regenerated on the A100 node and pass on the MI300A at their existing tolerances. On the merged tree the full Chemistry label on the A100 fails exactly those five and the IBM label passes 102 of 102.Which goldens move and by how much (largest change over all saved files of the test, divided by the largest value of that file; the golden files include the cells inside the body):
Every one of these is an isothermal, reacting or lumped chemistry wall with diffusion on, which are the cases whose ghost temperature changed: the ghost cell now holds wall gas at
T_s(densityp W/(R T_s), internal energy atT_s) instead of the windowed mirror, so the ghost cells themselves change by tens of percent. In the 25 x 25 tests (all but the two examples) about 24 of 625 cells change by more than 1 % in density at the last save, which is the ring of ghost cells around the body; the rest of the field moves by less (more than 1e-4 relative in about 520 cells at the last save, presumably the response to the changed wall flux; I did not trace it). The heat historyD/ib_heat.datof the adaptive-step tests has a different row count (for example 120 to 114 rows) because the step count follows the changed wave speeds. I did not separate the change in the fluid cells alone from that in the ghost cells beyond this count. The five added goldens behave the same way: 24 ghost-ring cells (25 x 25 grids) change by more than 1e-2 of the field maximum; the ghost internal energy drops from up to 1.4e6 J/kg (the mirror overshoot) to 5.6e5 J/kg (the gas atT_s), the fluid cells next to the body stay between that and the freestream value, and no species density is negative. In the closed box the gas mass outside 7 cells from the axis is 0.12 % above its initial value before and 0.07 % after.Limitations and not run
thermal_bc = 2outside the listed tests, AMR with bodies.f_face_thetaadds a loop over the fluid neighbours of each ghost point in every stage.This PR was made with Claude Code (AI).